Rebuild Replenishment Index
Durably requests a rebuild of the Warehouse’s Replenishment Index. Repeated requests coalesce into one pending generation, so retrying a request that may not have landed is safe; the published report keeps serving its current generation until the new one publishes.
A soft request lets a build already in progress finish and publish. A force request marks
a running build superseded — it stops without publishing and the fresh generation recomputes
everything from scratch, so repeated force requests at intervals shorter than a full build
defer publication indefinitely. force is for an explicit operator-initiated full
recalculation; automation should default to soft.
A successful request returns 202 Accepted with the requested_generation this request
coalesced into. Poll /v1/inventory/warehouses/{id}/replenishment-index/status until
published_generation is greater than or equal to that number (the report’s
meta.published_generation carries the same value), then read the report at
/v1/inventory/warehouses/{id}/replenishment-report. If status reads failed, the server
retries automatically and alerts operators on persistent failure — last_error carries a
classified failure summary; stop polling after an hour and escalate rather than wait
indefinitely.
Authorizations
Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.
Path Parameters
The id of the referenced Warehouse.
Body
Rebuild request for one Warehouse's Replenishment Index.
soft coalesces into the pending generation and lets a build already in progress finish and publish. force additionally marks a running build superseded, so its result is never published and the fresh generation recomputes everything from scratch — repeated force requests at intervals shorter than a full build defer publication indefinitely. Both request a new generation when none is pending. force is for an explicit operator-initiated full recalculation; automation should default to soft.
soft, force Response
Accepted - The rebuild request was durably recorded. requested_generation is this
caller's completion predicate: the rebuild is complete once the status endpoint's
published_generation (also the report's meta.published_generation) is greater than
or equal to it. The comparison is exact — a superseded generation never publishes, and
any successor publishes with a higher number computed from data read after this request.